import { NgModule } from '@angular/core';
import { STWidgetRegistry } from '@delon/abc/st';
import { SharedModule } from '@shared';

import { NzImageModule } from 'ng-zorro-antd/image';
import { STImgWidget } from './image-widget';
import { STG2MiniAreaWidget } from './g2-mini-area-widget';
import {G2MiniAreaModule} from "@delon/chart/mini-area";


export const STWIDGET_COMPONENTS = [
  STImgWidget,
  STG2MiniAreaWidget
];

@NgModule({
  declarations: STWIDGET_COMPONENTS,
  imports: [SharedModule, NzImageModule, G2MiniAreaModule],
  exports: [...STWIDGET_COMPONENTS]
})
export class STWidgetModule {
  constructor(widgetRegistry: STWidgetRegistry) {
    widgetRegistry.register(STImgWidget.KEY, STImgWidget);
    widgetRegistry.register(STG2MiniAreaWidget.KEY, STG2MiniAreaWidget);
  }
}
